#ifndef _RANDOMSTATICS_
#define _RANDOMSTATICS_
#include <map>
#include <string>
class RandomStastics
{
public:
	struct Counter
	{
		Counter()
			:m_iSuccess(0)
			,m_iFailed(0)
		{

		}
		std::string m_sName;
		int32 m_iSuccess;
		int32 m_iFailed;
	};
	static RandomStastics& Instance()
	{
		static RandomStastics _instance;
		return _instance;
	}
	void Credit(const std::string& sName,bool bSuccess);
	void Clear(){ m_mCounters.clear();}
	void EnumCounters(std::vector< const Counter*>& vCounters) const; 

private:
	std::map<std::string,Counter> m_mCounters;
	
};



#endif